package com.atguigu.newmvc2.vo.req;

import com.atguigu.newmvc2.annotation.Gender;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddEmpVo {
    private Integer id;

    @NotNull(message = "未填写姓名")
    private String name;

    @Max(value = 130,message = "年纪太大")
    private Integer age;

    @Email(message = "邮箱格式不正确")
    private String email;

    @Gender(message = "性别不对")
    private String gender;
    private String address;
    private BigDecimal salary;
}
